package io.renren.modules.app.controller;

import io.renren.common.utils.R;
import io.renren.modules.bs.entity.BsHospitalEntity;
import io.renren.modules.bs.service.BsHospitalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/app/hospital")
@Api(value = "医院接口",tags = "医院接口")
public class AppHospitalController {

    @Autowired
    private BsHospitalService hospitalService;

    /**
     * 获得医院所有列表数据
     */
    @GetMapping("listAll")
    @ApiOperation("获得医院所有列表数据")
    public R listAll(){
        List<BsHospitalEntity> list = hospitalService.list();
        return R.ok().put(list);
    }
}
